<template>
  <div class="chat-config">
    <span @click="show">gpt配置</span>
    <div v-show="config" class="chat-config-dialog">
      <div style="display: flex;justify-content: space-between;line-height: 35px">
        <span></span>
        <span>gpt配置</span>
        <span style="padding-right: 10px;font-size: 20px" @click="handleClose">x</span>
      </div>
      <div style="display: flex;justify-content: center;flex-direction: column;align-items: center">
        <div class="chat-config-row">
          <label>我的配置:</label>
          <input placeholder="请输入您的配置"/>
        </div>
        <div class="chat-config-row">
          <label>我的配置:</label>
          <input placeholder="请输入您的配置"/>
        </div>
        <div class="chat-config-row">
          <label>我的配置:</label>
          <input placeholder="请输入您的配置"/>
        </div>
        <div class="chat-config-row">
          <label>我的配置:</label>
          <input placeholder="请输入您的配置"/>
        </div>
        <div class="chat-config-row">
          <label>我的配置:</label>
          <input placeholder="请输入您的配置"/>
        </div>
        <div class="chat-config-row">
          <label>我的配置:</label>
          <input placeholder="请输入您的配置"/>
        </div>
        <div style="display: flex;justify-content: space-evenly">
          <button>提交</button>
          <button>清空</button>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
name: "chat-config",
  data(){
  return{
    config:false
  }
  },
  methods:{
    show(){
      this.config =true
      // const modal = document.querySelector('.chat-config');
      // modal.style.display = 'block';
      // modal.focus();
    },
    handleClose(){
      this.config=false
    }
  }
}
</script>

<style scoped>
  .chat-config{
    line-height: 5vh;
    width:13vw;
    background: #a7b3a3;
    border-radius: 5px;
    cursor: pointer;
  }
  .chat-config span{
    line-height: 3.5vh;
  }
  .chat-config-dialog{
    position: fixed;
    display: block;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30vw;
    height: 50vh;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  }
  .chat-config-row{
    display: flex;
    flex-direction: row;
    line-height: 35px;
    margin-top: 10px;
  }
  .chat-config-row input{
    border: solid 1px #a7b3a3;
  }

</style>